<?php

namespace App\Models\Scm;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Order extends Model
{
    use HasFactory;
    public $timestamps = FALSE;
    protected $table = 'biz_order';
    protected $fillable = ['id', 'kingdee_code', 'order_id'];

    public function __construct(array $attributes = [])
    {
        parent::__construct($attributes);
    }

    public function findRowKingdeeCode($kingdee_code){
        return self::where('kingdee_code', $kingdee_code)->where('del_flag', 0)->where('is_close', 0)->where('is_cancel', 0)->first();
    }
}
